package enumliteralisunique;

import enumliteralisunique.EnumLiteralIsUniqueMatch;
import org.eclipse.viatra2.emf.incquery.runtime.api.IMatchProcessor;
import sysmodel.Enumeration;
import sysmodel.Literal;

/**
 * A match processor tailored for the EnumLiteralIsUnique pattern.
 * 
 * Clients should derive an (anonymous) class that implements the abstract process().
 * 
 */
public abstract class EnumLiteralIsUniqueProcessor implements IMatchProcessor<EnumLiteralIsUniqueMatch> {
  /**
   * Defines the action that is to be executed on each match.
   * @param pEnumeration the value of pattern parameter enumeration in the currently processed match 
   * @param pLiteral the value of pattern parameter literal in the currently processed match 
   * @param pLiteral2 the value of pattern parameter literal2 in the currently processed match 
   * 
   */
  public abstract void process(final Enumeration enumeration, final Literal literal, final Literal literal2);
  
  @Override
  public void process(final EnumLiteralIsUniqueMatch match) {
    process(match.getEnumeration(), match.getLiteral(), match.getLiteral2());  				
    
  }
}
